package com.tensquare.recruit.dao;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import com.tensquare.recruit.pojo.Recruit;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * 数据访问接口
 *
 * @author Administrator
 */
public interface RecruitDao extends JpaRepository<Recruit, String>, JpaSpecificationExecutor<Recruit> {


    /**
     * @return java.util.List<com.tensquare.recruit.pojo.Recruit>
     * @Author zhangshuai
     * @Date 2019/1/14 19:50
     * @Description //查询推荐职位列表(按创建日期降序排序)
     * @Param [state]
     * @version 1.0
     **/
    public List<Recruit> findTop4ByStateOrderByCreatetimeDesc(String state);

/**
  * @Author zhangshuai
  * @Date 2019/1/14 20:03
  * @Description //查询最新职位列表
  * @Param [state]
  * @return java.util.List<com.tensquare.recruit.pojo.Recruit>
  * @version 1.0
        **/
    public List<Recruit> findTop4ByStateNotOrderByCreatetimeDesc(String state);


}
